package com.tangly.module.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tangly.module.enums.BannerIs_deleteEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * created by yehao on 2018/7/24.
 */

@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "banner_file")
public class BannerEntity {




    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间",example = "2018-06-13 08:00:00")
    private Date create_time;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date update_time;
    /**
     * 是否删除  枚举
     */
    @ApiModelProperty(value = "是否删除")
    private BannerIs_deleteEnum is_delete;
    /**
     * 文件名
     */
    @ApiModelProperty(value = "文件名")
    private String file_name;
    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    private String info;
    /**
     * 图片路径
     */
    @ApiModelProperty(value = "图片路径")
    @NotNull(message = "图片路径不能为空")
    private String url;




}
